package com.aike.dao;

import com.aike.pojo.GradeListForAdministrator;
import com.aike.pojo.GradeListForStudent;
import com.aike.pojo.GradeListForTeacher;
import com.aike.pojo.GradeShowForTeacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GradeMapper {

    //显示成绩列表给学生
    List<GradeListForStudent> getGradeListForStudent(Integer userId);

    //显示成绩列表给老师
    List<GradeListForTeacher> getGradeListForTeacher(Integer userId);

    //显示成绩展示给老师
    GradeShowForTeacher getGradeShowForTeacher(Integer gradeId);

    //保存成绩
    int saveGrade(@Param("gradeId") Integer gradeId, @Param("gradeNum") Integer gradeNum);

    //显示成绩列表给管理员
    List<GradeListForAdministrator> getGradeListForAdministrator();

    //通过学生id删除所有成绩
    int deleteGradeByStudentId(Integer userId);

    //通过老师id删除所有成绩
    int deleteGradeByTeacherId(Integer userId);

    //增加新提交答案
    int addNewTaskAnswer(@Param("userId") Integer userId, @Param("taskId") Integer taskId, @Param("gradeAnswer")String gradeAnswer);

}
